@echo off
echo ========================================
echo Find Build Output Directory
echo ========================================
echo.

echo Searching for executable files...
echo.

if exist "build\LimeReader.exe" (
    echo [Found] build\LimeReader.exe
    set "BUILD_DIR=build"
    goto :found
)

if exist "build\Release\LimeReader.exe" (
    echo [Found] build\Release\LimeReader.exe
    set "BUILD_DIR=build\Release"
    goto :found
)

if exist "build\bin\Release\LimeReader.exe" (
    echo [Found] build\bin\Release\LimeReader.exe
    set "BUILD_DIR=build\bin\Release"
    goto :found
)

if exist "bin\LimeReader.exe" (
    echo [Found] bin\LimeReader.exe
    set "BUILD_DIR=bin"
    goto :found
)

if exist "LimeReader.exe" (
    echo [Found] LimeReader.exe (current directory)
    set "BUILD_DIR=."
    goto :found
)

echo [ERROR] Cannot find LimeReader.exe
echo Please compile the project first!
echo.
pause
exit /b 1

:found
echo.
echo Build directory: %BUILD_DIR%
echo.
echo Contents:
dir /b "%BUILD_DIR%"
echo.
echo Press any key to continue...
pause >nul

